@import '@/styles/variables';

.goods-details-page {
  height: 100vh;
  display: flex;
  flex-direction: column;

  .content-scroll {
    flex: 1;
    background: $background-color-light;
  }

  .swiper-section {
    height: 750rpx;
    background: white;
    .main-image {
      width: 100%;
      height: 100%;
    }
  }

  .info-section {
    padding: 20rpx 30rpx;
    background: white;
    
    .price-row {
      display: flex;
      align-items: baseline;
      margin-bottom: 15rpx;

      .current-price {
        color: $primary-color;
        font-size: 44rpx;
        font-weight: bold;
      }

      .original-price {
        color: $text-color-secondary;
        font-size: 28rpx;
        margin-left: 20rpx;
        text-decoration: line-through;
      }

      .sales {
        margin-left: auto;
        color: $text-color-secondary;
      }
    }

    .title {
      font-size: 32rpx;
      line-height: 1.4;
      margin-bottom: 20rpx;
    }

    .tags {
      display: flex;
      gap: 15rpx;
      
      .tag {
        padding: 6rpx 15rpx;
        background: #fff7f1;
        color: $primary-color;
        border-radius: 8rpx;
        font-size: 24rpx;
      }
    }
  }

  .spec-section {
    margin-top: 20rpx;
    padding: 30rpx;
    background: white;

    .section-title {
      font-size: 32rpx;
      margin-bottom: 30rpx;
    }

    .spec-items {
      display: flex;
      gap: 20rpx;
      flex-wrap: wrap;

      .spec-item {
        padding: 15rpx 30rpx;
        border: 1rpx solid $border-color;
        border-radius: 8rpx;
        font-size: 28rpx;

        &.active {
          border-color: $primary-color;
          color: $primary-color;
          background: #fef5f5;
        }
      }
    }
  }

  .footer-bar {
    background: white;
    padding: 20rpx 30rpx;
    box-shadow: 0 -4rpx 12rpx rgba(0,0,0,0.06);

    .button-group {
      display: flex;
      align-items: center;
      gap: 30rpx;

      .icon-button {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 24rpx;
        color: $text-color-secondary;

        .iconfont {
          font-size: 44rpx;
          margin-bottom: 6rpx;
        }
      }

      .action-button {
        flex: 1;
        height: 80rpx;
        border-radius: 40rpx;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 32rpx;
        color: white;

        &.add-cart {
          background: linear-gradient(90deg, #ffd01e, #ff8917);
        }

        &.buy-now {
          background: linear-gradient(90deg, #ff6034, #ff2b34);
        }
      }
    }
  }
}

@media (max-width: 480px) {
  .goods-details-page {
    .swiper-section {
      height: 60vh;
    }
  }
}